/**
 * @FileName: MyAplicationStartedEventListener.java
 * @Package: com.springboot.listener
 * @author lig134
 * @created 2017/3/7 10:15
 * <p>
 * Copyright 2015 ziroom
 */
package com.springboot.listener;

import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;

/**
 * <p></p>
 *spring boot 启动监听类
 * 做一些执行前的设置
 * <PRE>
 * <BR>	修改记录
 * <BR>-----------------------------------------------
 * <BR>	修改日期			修改人			修改内容
 * </PRE>
 *
 * @author lig134
 * @since 1.0
 * @version 1.0
 */
public class MyAplicationStartedEventListener implements ApplicationListener<ApplicationStartedEvent>{
   org.slf4j.Logger logger= LoggerFactory.getLogger(MyAplicationStartedEventListener.class);
    @Override
    public void onApplicationEvent(ApplicationStartedEvent event) {
        SpringApplication app=event.getSpringApplication();
        app.setShowBanner(false);//不显示banner信息
        logger.info("====MyApplicationStartListener====");
        System.out.println("===MyApplicationstartListener===");
    }
}